import { ref } from 'vue';

export const reload = ref<boolean>(false);
export const deptTreeNodeId = ref<number>(0);

export const buildDepts = (depts) => {
  depts.forEach((data) => {
    if (data.children) {
      buildDepts(data.children);
    }
    if (data.leaf) {
      data.isLeaf = data.leaf;
    }
  });
};
